<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>异步请求</h1>
<input type="button" value="发送请求" onclick="fn()">


<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>
<script>
    function fn() {
        axios.get("/test01").then(function (response) {
            alert(response.data)
        }).catch(function (err) {
            alert(err)
        })
    }
</script>

</body>
</html>